//
//  main.cpp
//  Contest Problem 1
//
//  Created by Zachary Brody on 12/15/13.
//  Copyright (c) 2013 Zachary Brody. All rights reserved.
//

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <fstream>

using namespace std;

int mod (double one, double two)
{
    return (int)one % (int)two;
}

int main(int argc, const char * argv[])
{
    cout.precision(30);
    cin.precision(30);
    double width;
    double height;
    double a;
    double flagsNeeded;
    cin >> width >> height >> a;
    if (mod(width, a) == 0) {
        flagsNeeded = width/a;
    } else {
        flagsNeeded = (width - mod(width, a))/a + 1;
    }
    if (mod(height, a) == 0) {
        flagsNeeded *= height/a;
    } else {
        flagsNeeded *= (height - mod(height, a))/a + 1;
    }
    cout << flagsNeeded;
}

